<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">

<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
<link href="lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" />

<title>新增内容</title>
</head>
<body>
<div class="pd-20">
	<form action="/baby/infos/addInformation" method="post" class="form form-horizontal form-ueditor" id="form"  enctype="multipart/form-data">
		<div class="row cl">
			<label class="form-label col-1"><span class="c-red">*</span>分类名称：</label>
			<div class="formControls col-2"> <span class="select-box">
				<select name="type" id="type" class="select">
					
					<option value="2">赴美生子 流程</option>
					<option value="3">赴美生子 资讯</option>
					<option value="4">孕前服务 保险服务</option>					
					<option value="16">孕前服务 行前服务</option>
					
				</select>
				</span> </div>
		</div>

		<div class="row cl">
			<label class="form-label col-1"><span class="c-red">*</span>标题内容：</label>
			<div class="formControls col-3">
				<input type="text" class="input-text" value="" placeholder="" id="" name="title">
			</div>
		</div>

		<div class="row cl">
			<label class="form-label col-1">信息内容：</label>
			<div class="formControls col-10"> 
				<script id="editor" type="text/plain" style="width:100%;height:600px;" name="details"></script> 
			</div>
		</div>

		<div class="row cl">
			<div class="col-10 col-offset-1">
				<input type="submit" class="btn btn-primary radius"  name="submit" value="添 加" class="submit" />
			</div>
		</div>
	</form>
</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script> 
<script type="text/javascript" src="lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="lib/webuploader/0.1.5/webuploader.min.js"></script> 
<script type="text/javascript" src="lib/ueditor/1.4.3/ueditor.config.js"></script> 
<script type="text/javascript" src="lib/ueditor/1.4.3/ueditor.all.min.js"> </script> 
<script type="text/javascript" src="lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script> 
<script type="text/javascript" src="js/H-ui.js"></script> 
<script type="text/javascript" src="js/H-ui.admin.js"></script>
<script src="js/jquery-form.js" type="text/javascript"></script> 
<script type="text/javascript" src="js/jquery.validate.min.js" ></script>
<script type="text/javascript" src="js/messages_zh.min.js" ></script>
<script type="text/javascript" src="js/rule.js" ></script>

<script type="text/javascript">
$(function(){
	var ue = UE.getEditor('editor');
});

$(document).ready(function(){

        $('#form').ajaxForm(function(data){

            //alert(data);//弹出ajax请求后的回调结果，data回调数据  onclick="sub()"
            if(data.code =="200" ){ 
             alert(data.message); 
             console.log(data); 
             var type = $('.select').val();
             // alert(type); 
             //setCookie("username",data.data.userName);
             if(type == 1){
             	window.location.href='child-list.html';
             }else if(type == 2){
             	window.location.href='votes-list.html';
             }else if(type ==3){
             	window.location.href='news-list.html';
             }else if(type ==4){
             	window.location.href='insur-list.html';
             }else if(type ==5){
              	window.location.href='doctor-list.html';
             }else if(type ==6){
             	window.location.href = 'votes-list.html';
             window.location.href = 'check-list.html';
             }else if(type ==7){
              window.location.href = 'rush-list.html';
             }else if(type ==8){
              window.location.href='advice-list.html';
             }else if(type ==9){
              window.location.href='usa2-list.html';
             }else if(type ==10){
              window.location.href = 'school-list.html';
             }else if(type ==11){
              window.location.href = 'usa3-list.html'; 
             }else if(type ==12){
              window.location.href = 'thai-list.html';  
          	 } else if(type ==13){
              window.location.href = 'baby-photo-list.html'; 
             } else if(type ==14){
              window.location.href = 'passport-travel-list.html'; 
             } else if(type ==16){
              window.location.href = 'tour_list.html'; 
             } 
         }else{  
              alert(data.message); 
             console.log(data);  
         }  
        });

});
</script>
</body>
</html>